<template>
  <div class="backView">
    <div class="leftView">
      <div class="indexBack">
        <p class="numLabel" v-if="rankingIndex > 2">
          {{rankingIndex + 1}}
        </p>
        <img class="rankingImg" v-else :src="'/web-hft-ee/static/img/m/ranking_list_' + (rankingIndex + 1) + '.png'" />
      </div>

      <img class="headerImgView" src="/web-hft-ee/static/img/university/avatar.png" v-real-img="data.pic">
      <p class="nameLabel ellipsis1">{{data.nickname}}</p>
    </div>
    <p class="countLabel">{{data.learnValue}}</p>
  </div>
</template>

<script>
  export default {
    name: "RankingCell",
    props: ["rankingIndex", "data"],

  }
</script>

<style scoped>
  .backView {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .leftView {
    display:  flex;
    justify-content: normal;
    align-items: center;
  }
  .indexBack {
    /*background-color: red;*/
    width: 36px;
    text-align: center;
    /*justify-content: center;*/
  }
  .rankingImg {
    width: 28px;
    padding: 0 4px;
  }
  .numLabel {
    font-size: 16px;
    color: #333333;
    font-weight: bold;
  }
  .headerImgView {
    margin-left: 8px;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background-color: white;
    object-fit: cover;
  }
  .nameLabel {
    margin-left: 8px;
    padding-right: 16px;
    font-weight: bold;
    font-size: 16px;
    flex: 1;
  }
  .countLabel {
    color: #333333;
    font-size: 16px;
    font-weight: bold;
  }
</style>
